package com.msmall.community.common.service;

import com.msmall.base.service.BaseManager;
import com.msmall.community.common.model.ScoreRule;

public interface ScoreRuleManager extends BaseManager<ScoreRule, Long>{

	public void saveScoreRule(ScoreRule gradeRule);
	
	/**
	 * 从缓存获得积分规则，否则从数据读取
	 * @param key 规则英文名称
	 * @return
	 */
	public ScoreRule getScoreRule(String key)  throws Exception;
	
	/**
	 * 直接从数据读取
	 * @param key
	 * @return
	 * @throws Exception
	 */
	public ScoreRule loadScoreRule(String key) throws Exception;
}
